package cn.iune.erp.provider;

import java.math.BigDecimal;
import java.sql.Date;
import java.sql.Timestamp;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.persistence.UniqueConstraint;
import javax.persistence.Version;

import com.justep.baas.data.RowState;

@Entity
@Table(name = "FileProvider"
, uniqueConstraints = { 
	@UniqueConstraint(name = "fileProvider1", columnNames = { "providerNo", "enterpriseNo" }), 
//	@UniqueConstraint(columnNames = { "shortName", "enterpriseNo" }),
//	@UniqueConstraint(columnNames = { "providerName", "enterpriseNo" }),

}
)@NamedQuery(name="FileProvider.findAll", query="SELECT s FROM FileProvider s")
public class FileProvider {

	public FileProvider (){
		
	}
	@Id
	@Column(length=36)
	private String fID;
	
	@Column(length=32)
	private String systemCode;
	@Column(length=4)
	private String billType;
	@Column(length=20)
	private String billTypeName;
	private Date orderDate;
	@Column(length=10)
	private String state;
	@Column(length=10)
	private String status;
	
	@Column(length=3)
	private String storageTypeD;
	@Column(length=20)
	private String storageTypeDLabel;
	@Column(length=15)
	private String providerNo;
	@Column(length=20)
	private String shortName;
	@Column(length=128)
	private String providerName;

	private Date dealDateFirst;
	private Date dealDateLast;
	
	@Column(length=128)
	private String accountBank;
	@Column(length=20)
	private String accountNo;
	@Column(length=20)
	private String taxNo;
	@Column(length=1)
	private String invoiceCategory;
	@Column(length=20)
	private String invoiceCategoryLabel;

	@Column(length=1)
	private String settleCategory;
	@Column(length=20)
	private String settleCategoryLabel;
	
	private int taxType = 1;
	@Column(length=10)
	private String taxTypeLabel = "1.应税内含";
	@Column(precision=10,scale=2)
	private BigDecimal taxRate = BigDecimal.ZERO;
	@Column(precision=10,scale=2)
	private BigDecimal depositRate = BigDecimal.ZERO;
	
	@Column(length=36)
	private String sIDCard;//身份证号/组织代码
	
	@Column(length=64)
	private String sPhone;//电话
	@Column(length=64)
	private String sFax;//传真
	
	@Column(length=50)
	private String sAddressName;//地址名称
	@Column(length=255)
	private String sAddress;//地址
	@Column(length=128)
	private String sAddressDetail;//详细地址
	
	///////////////////////////////////////////////
//	@Transient
//	@Column(length=50)
//	private String sRegion;
	@Column(length=50)
	private String sProvince;
	@Column(length=50)
	private String sCity;
	@Column(length=50)
	private String sZone;
	///////////////////////////////////////////////////////
	
	@Column(length=20)
	private String sMobilePhone;//移动电话
	@Column(length=32)
	private String ognID;//云ID
	
	@Column(length=16)
	private String sZip;//邮编
	
	
	@Column(length=32)
	private String groupID;
	@Column(length=20)
	String groupLabel;
	@Column(length=128)
	String groupFullLabel;

	
	//存货会计科目（进货单）-----------------------应收会计科目（销售发票）
	@Column(length=10)
	private String captionNo1;//科目编码
	@Column(length=50)
	private String captionName1;//科目名称
	//应交增值税会计科目（进货单）---------收入会计科目（销售发票）
	@Column(length=10)
	private String captionNo2;//科目编码
	@Column(length=50)
	private String captionName2;//科目名称
	//账款会计科目（进货单）-----------------------应交增值税会计科目（销售发票）
	@Column(length=10)
	private String captionNo3;//科目编码
	@Column(length=50)
	private String captionName3;//科目名称
	//费用会计科目（进货单）----------------------应交营业税会计科目（销售发票）
	@Column(length=10)
	private String captionNo4;//科目编码
	@Column(length=50)
	private String captionName4;//科目名称

	
	@Column(length=256)
	private String employeeNo;
	@Column(length=256)
	private String employeeName;
	

	@Column(length=255)
	private String comments;
	
	@Column(length=15)
	private String cUsercode;
	@Column(length=20)
	private String cUsername;//制单人
	private Timestamp cDatetime;
	@Column(length=15)
	private String tUsercode;
	@Column(length=20)
	private String tUsername;//审核人
	private Timestamp tDatetime;
	@Column(length=15)
	private String eUsercode;
	@Column(length=20)
	private String eUsername;//关单人
	private Timestamp eDatetime;
	
	@Column(length=65)
	private String userId;

	@Column(length=128)
	private String enterpriseNo;
	@Column(length=128)
	private String enterpriseName;

	@Version
	private int version = 0;
	
	@Transient//非持久字段
	private RowState rowState;
	public RowState getRowState() {
		return rowState;
	}
	public void setRowState(RowState rowState) {
		this.rowState = rowState;
	}

	public int getVersion() {
		return version;
	}

	public void setVersion(int version) {
		this.version = version;
	}
	
	public String getShortName() {
		return shortName;
	}
	public void setShortName(String shortName) {
		this.shortName = shortName;
	}
	public String getSystemCode() {
		return systemCode;
	}
	public void setSystemCode(String systemCode) {
		this.systemCode = systemCode;
	}
	public String getBillType() {
		return billType;
	}
	public void setBillType(String billType) {
		this.billType = billType;
	}
	public String getBillTypeName() {
		return billTypeName;
	}
	public void setBillTypeName(String billTypeName) {
		this.billTypeName = billTypeName;
	}
	public Date getOrderDate() {
		return orderDate;
	}
	public void setOrderDate(Date orderDate) {
		this.orderDate = orderDate;
	}
	public String getState() {
		return state;
	}
	public void setState(String state) {
		this.state = state;
	}
	public String getStatus() {
		return status;
	}
	public void setStatus(String status) {
		this.status = status;
	}
	public String getStorageTypeD() {
		return storageTypeD;
	}
	public void setStorageTypeD(String storageTypeD) {
		this.storageTypeD = storageTypeD;
	}
	public String getStorageTypeDLabel() {
		return storageTypeDLabel;
	}
	public void setStorageTypeDLabel(String storageTypeDLabel) {
		this.storageTypeDLabel = storageTypeDLabel;
	}
	public String getAccountBank() {
		return accountBank;
	}
	public void setAccountBank(String accountBank) {
		this.accountBank = accountBank;
	}
	public String getAccountNo() {
		return accountNo;
	}
	public void setAccountNo(String accountNo) {
		this.accountNo = accountNo;
	}
	public String getTaxNo() {
		return taxNo;
	}
	public void setTaxNo(String taxNo) {
		this.taxNo = taxNo;
	}
	public String getInvoiceCategory() {
		return invoiceCategory;
	}
	public void setInvoiceCategory(String invoiceCategory) {
		this.invoiceCategory = invoiceCategory;
	}
	public String getInvoiceCategoryLabel() {
		return invoiceCategoryLabel;
	}
	public void setInvoiceCategoryLabel(String invoiceCategoryLabel) {
		this.invoiceCategoryLabel = invoiceCategoryLabel;
	}
	public int getTaxType() {
		return taxType;
	}
	public void setTaxType(int taxType) {
		this.taxType = taxType;
	}
	public String getTaxTypeLabel() {
		return taxTypeLabel;
	}
	public void setTaxTypeLabel(String taxTypeLabel) {
		this.taxTypeLabel = taxTypeLabel;
	}
	public BigDecimal getTaxRate() {
		return taxRate;
	}
	public void setTaxRate(BigDecimal taxRate) {
		this.taxRate = taxRate;
	}
	public BigDecimal getDepositRate() {
		return depositRate;
	}

	public void setDepositRate(BigDecimal depositRate) {
		this.depositRate = depositRate;
	}

	public String getSettleCategory() {
		return settleCategory;
	}
	public void setSettleCategory(String settleCategory) {
		this.settleCategory = settleCategory;
	}
	public String getSettleCategoryLabel() {
		return settleCategoryLabel;
	}
	public void setSettleCategoryLabel(String settleCategoryLabel) {
		this.settleCategoryLabel = settleCategoryLabel;
	}
	public String getcUsercode() {
		return cUsercode;
	}
	public void setcUsercode(String cUsercode) {
		this.cUsercode = cUsercode;
	}
	public String getcUsername() {
		return cUsername;
	}
	public void setcUsername(String cUsername) {
		this.cUsername = cUsername;
	}
	public Timestamp getcDatetime() {
		return cDatetime;
	}
	public void setcDatetime(Timestamp cDatetime) {
		this.cDatetime = cDatetime;
	}
	public String gettUsercode() {
		return tUsercode;
	}
	public void settUsercode(String tUsercode) {
		this.tUsercode = tUsercode;
	}
	public String gettUsername() {
		return tUsername;
	}
	public void settUsername(String tUsername) {
		this.tUsername = tUsername;
	}
	public Timestamp gettDatetime() {
		return tDatetime;
	}
	public void settDatetime(Timestamp tDatetime) {
		this.tDatetime = tDatetime;
	}
	public String geteUsercode() {
		return eUsercode;
	}
	public void seteUsercode(String eUsercode) {
		this.eUsercode = eUsercode;
	}
	public String geteUsername() {
		return eUsername;
	}
	public void seteUsername(String eUsername) {
		this.eUsername = eUsername;
	}
	public Timestamp geteDatetime() {
		return eDatetime;
	}
	public void seteDatetime(Timestamp eDatetime) {
		this.eDatetime = eDatetime;
	}
	public String getUserId() {
		return userId;
	}
	public void setUserId(String userId) {
		this.userId = userId;
	}

	public Date getDealDateFirst() {
		return dealDateFirst;
	}
	public void setDealDateFirst(Date dealDateFirst) {
		this.dealDateFirst = dealDateFirst;
	}
	public Date getDealDateLast() {
		return dealDateLast;
	}
	public void setDealDateLast(Date dealDateLast) {
		this.dealDateLast = dealDateLast;
	}
	public String getfID() {
		return fID;
	}
	public void setfID(String fID) {
		this.fID = fID;
	}
	public String getProviderNo() {
		return providerNo;
	}
	public void setProviderNo(String providerNo) {
		this.providerNo = providerNo;
	}
	public String getProviderName() {
		return providerName;
	}
	public void setProviderName(String providerName) {
		this.providerName = providerName;
	}
	public String getEnterpriseNo() {
		return enterpriseNo;
	}
	public void setEnterpriseNo(String enterpriseNo) {
		this.enterpriseNo = enterpriseNo;
	}
	public String getEnterpriseName() {
		return enterpriseName;
	}
	public void setEnterpriseName(String enterpriseName) {
		this.enterpriseName = enterpriseName;
	}
	public String getComments() {
		return comments;
	}
	public void setComments(String comments) {
		this.comments = comments;
	}
	public String getsIDCard() {
		return sIDCard;
	}
	public void setsIDCard(String sIDCard) {
		this.sIDCard = sIDCard;
	}
	public String getsZip() {
		return sZip;
	}
	public void setsZip(String sZip) {
		this.sZip = sZip;
	}
	public String getsPhone() {
		return sPhone;
	}
	public void setsPhone(String sPhone) {
		this.sPhone = sPhone;
	}
	public String getsFax() {
		return sFax;
	}
	public void setsFax(String sFax) {
		this.sFax = sFax;
	}
	public String getsAddress() {
		return sAddress;
	}
	public void setsAddress(String sAddress) {
		this.sAddress = sAddress;
	}
	public String getsAddressName() {
		return sAddressName;
	}
	public void setsAddressName(String sAddressName) {
		this.sAddressName = sAddressName;
	}
	public String getsAddressDetail() {
		return sAddressDetail;
	}
	public void setsAddressDetail(String sAddressDetail) {
		this.sAddressDetail = sAddressDetail;
	}
	public String getsMobilePhone() {
		return sMobilePhone;
	}
	public void setsMobilePhone(String sMobilePhone) {
		this.sMobilePhone = sMobilePhone;
	}
	public String getGroupID() {
		return groupID;
	}
	public void setGroupID(String groupID) {
		this.groupID = groupID;
	}
	public String getEmployeeNo() {
		return employeeNo;
	}
	public void setEmployeeNo(String employeeNo) {
		this.employeeNo = employeeNo;
	}
	public String getEmployeeName() {
		return employeeName;
	}
	public void setEmployeeName(String employeeName) {
		this.employeeName = employeeName;
	}
	public String getsProvince() {
		return sProvince;
	}
	public void setsProvince(String sProvince) {
		this.sProvince = sProvince;
	}
	public String getsCity() {
		return sCity;
	}
	public void setsCity(String sCity) {
		this.sCity = sCity;
	}
	public String getsZone() {
		return sZone;
	}
	public void setsZone(String sZone) {
		this.sZone = sZone;
	}
	public String getOgnID() {
		return ognID;
	}
	public void setOgnID(String ognID) {
		this.ognID = ognID;
	}
	public String getGroupLabel() {
		return groupLabel;
	}
	public void setGroupLabel(String groupLabel) {
		this.groupLabel = groupLabel;
	}
	public String getGroupFullLabel() {
		return groupFullLabel;
	}
	public void setGroupFullLabel(String groupFullLabel) {
		this.groupFullLabel = groupFullLabel;
	}
	public String getCaptionNo1() {
		return captionNo1;
	}
	public void setCaptionNo1(String captionNo1) {
		this.captionNo1 = captionNo1;
	}
	public String getCaptionName1() {
		return captionName1;
	}
	public void setCaptionName1(String captionName1) {
		this.captionName1 = captionName1;
	}
	public String getCaptionNo2() {
		return captionNo2;
	}
	public void setCaptionNo2(String captionNo2) {
		this.captionNo2 = captionNo2;
	}
	public String getCaptionName2() {
		return captionName2;
	}
	public void setCaptionName2(String captionName2) {
		this.captionName2 = captionName2;
	}
	public String getCaptionNo3() {
		return captionNo3;
	}
	public void setCaptionNo3(String captionNo3) {
		this.captionNo3 = captionNo3;
	}
	public String getCaptionName3() {
		return captionName3;
	}
	public void setCaptionName3(String captionName3) {
		this.captionName3 = captionName3;
	}
	public String getCaptionNo4() {
		return captionNo4;
	}
	public void setCaptionNo4(String captionNo4) {
		this.captionNo4 = captionNo4;
	}
	public String getCaptionName4() {
		return captionName4;
	}
	public void setCaptionName4(String captionName4) {
		this.captionName4 = captionName4;
	}

	

}
